﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="syc._Default" %><html>
<head>
<title>陕西延长石油材料公司 生产管理系统</title>
<base target="contents"/>
</head>
<body scroll="no" onselectstart="return(true);">
<script type="text/javascript" language="javascript" src="common.js"></script>
<script language="javascript">
    function showmsgbox(title, text, icon) {
        document.getElementById("msgbox_title").value = title;
        document.getElementById("msgbox_text").innerHTML = text;
        document.getElementById("msgbox_icon").className = "msgbox_" + icon;
        msgbox_back.style.display = "";
        msgbox.style.display = "";
    }

    function hidelogo() {//显示隐藏logo
        if (logohided) {
            logohided = false;
            logo.firstChild.style.display = "";
            logo.style.height = "82px";
            notice.style.top = "65px";
        }
        else {
            logohided = true;
            logo.firstChild.style.display = "none";
            logo.style.height = "20px";
            notice.style.top = "3px";
        }
        doresize();
    }
    function hidesubmenu() {//显示隐藏二级
        if (submenuhided) {
            submenuhided = false;
            vsplit.firstChild.className = "vsplitshow";
            submenutop.style.display = "";
            submenuview.style.display = "";
        }
        else {
            submenuhided = true;
            vsplit.firstChild.className = "vsplithide";
            submenutop.style.display = "none";
            submenuview.style.display = "none";
        }
    }

    function doresize() {//放缩窗口时对界面重新布局
        var w = document.body.clientWidth;
        var h = document.body.clientHeight;
        msgbox.style.left = (w / 2 - 180) + "px";
        msgbox.style.top = (h / 2 - 180) + "px";
        if (w > menubarwidth) {
            menuspace.width = w - menubarwidth;
            }
        var logoheight = 82;
        if (logohided) logoheight = 20;
        mainview.height = h - logoheight - 35;

        mainframe.height = mainview.height - 16;
        var currentmenu;
        if (openedmenu) {
            currentmenu = openedmenu.nextSibling;
            if (mainframe.height > submenunum * 24)
                currentmenu.style.height = (mainframe.height - submenunum * 24);
        }
        swinbody.width = w - 38;
        swinbody.height = h - 62;
        swintitle.style.width = (w - 100)+"px";
    }

    function resetsubmenu(supermenu) {//设置二级菜单
        hotmenu.innerHTML = supermenu;
        submenuview.innerHTML = "";
        submenunum = 0;
        openedmenu = null;
        hot = null;
    }
    function openmenu(m) {//打开菜单
        if (m.className == "smtitle0") return;
        if (openedmenu) {
            openedmenu.nextSibling.style.display = "none";
            openedmenu.className = "smtitle1";
        }
        m.className = "smtitle2";
        m.nextSibling.style.display = "block";
        openedmenu = m;
        doresize();
        if (submenuhided) hidesubmenu();
    }
    function appendsubmenu(txt) {//增加二级菜单
        var tmp = "<div id='sm_" + submenunum + "' class='submenu'>";
        tmp += "<div class='smtitle0' onclick='openmenu(this);'>" + txt + "</div><div style='display:none;'></div></div>";
        submenuview.innerHTML += tmp;
        submenunum++;
    }
    
    function appendsubmenua(txt, href) {//增加二级菜单有连接的
        var tmp = "<div id='sm_" + submenunum + "' class='submenu'>";
        tmp += "<div class='smtitle1' onclick='openmenu(this);'><a class=a3 href="+href+">" + txt + "</a></div><div style='display:none;'></div></div>";
        submenuview.innerHTML += tmp;
        submenunum++;
    }

    function resetitem(n) {
        var mnu = document.getElementById("sm_" + n);
        mnu.lastChild.innerHTML ="";
    }
    
    function addmenuitem(txt, fid, n, icon) {//增加二级菜单的菜单项
        var mnu = document.getElementById("sm_" + n);
        mnu.firstChild.className = "smtitle1";
        //var iconid = "000" + fid;
        //iconid = iconid.substr(iconid.length-3);
        var func;
        
        if (isNaN(new Number(fid))) {
            func = fid;
        }
        else {
            func = "dofunction.aspx?id=" + fid ;
        }
        if (icon.indexOf(".") == -1) icon += ".gif";
        var tmp = "<div class='mnuitem0' style=\"background-image: url('icons/"
        + icon + "');\" onmouseover='mnu_mouseover(this);' onmouseout='mnu_mouseout(this);'>"
        + "<a class='a2' href='"+func+"'>" + txt + "</a></div>";
        mnu.lastChild.innerHTML += tmp;
    }
    function mnu_mouseover(m) {
        m.className = "mnuitem1";
    }
    function mnu_mouseout(m) {
        if (m.className == "mnuitem1") {
            m.className = "mnuitem0";
        }
    }
    function getfirstsubmenu() {
        return (document.getElementById("sm_0").firstChild);
    }

    function dialog_login_hide() {
        document.getElementById("backcover").style.display = "none";
        document.getElementById("dialog_login").style.display = "none";
    }
    function dialog_login_show() {
        document.getElementById("backcover").style.display = "";
        document.getElementById("dialog_login").style.display = "";
    }
    function dialog_login_reset(r) {
        document.getElementById("login_uid").value = "";
        document.getElementById("login_pwd").value = "";
        document.getElementById("login_cod").value = "";
        document.getElementById("login_ref").value = r;
        document.getElementById("login_error").innerHTML = "·请登录获得更多权限，验证码不区分大小写，如果验证码不清晰请点击验证码图片。";
        document.getElementById("login_cim").src = "imgcode.aspx?" + Math.random();
        dialog_login_show();
    }
    function set_dialog_login_error(msg) {
        document.getElementById("login_error").innerHTML = msg;
        dialog_login_show();
    }

    function dialog_login_hide() {
        document.getElementById("dialog_login").style.display = "none";
        backcover_hide();
    }

    function swin_close() {
        swin.style.display = "none";
        backcover_hide();
        var b = contents.document.getElementById("Button_Query");
        if (b) {
            b.fireEvent("onclick");
        }
        //contents.document.location.reload();
    }
    function swin_onload() {
        var t = swinframe.document.getElementById("wintop");
        if (t) {
            swintitle.innerHTML = t.innerHTML;
            t.style.display = "none";
        }
        swin_show();
    }
    function swin_show() {
        swin.style.display = "";
        document.getElementById("backcover").style.display = "";
    }
    function backcover_hide() {
        if (swin.style.display == "none" && document.getElementById("dialog_login").style.display == "none") {
            document.getElementById("backcover").style.display = "none"; 
        }
    }

    function swin_load(url) {
        swinbody.innerHTML = '<iframe id="swinframe" src="' + url + '" name="swinframe" width="100%" height="100%" border="0" frameborder="0" scrolling="yes" onload="swin_onload();"></iframe>';
    }
</script>

<!--登录-->

<div class="backcover" id="backcover" style="display:none;"></div>
<table id="dialog_login" class="dialog_back" border="0" cellpadding="0" style="border-collapse: collapse;display:none;">
	<tr>
		<td align="center" valign="middle">　
		    
            <table class="dialog_login" border="0" cellpadding="0" style="border-collapse: collapse" width="320" height="230">
                <tr>
	                <td height="30" align="right" valign="top"><input type="button" class="button_login_close" onmouseover="this.style.backgroundPositionY=20; " onmouseout="this.style.backgroundPositionY=0;" onclick="dialog_login_hide();" /></td>
                </tr>
                <tr>
	                <td height="57">　</td>
                </tr>
                <form method="post" target="contents" action="Login.aspx">
                <input id="login_ref" type="hidden" name="ref" />
                <tr>
	                <td class="loginfield">工　号：<input id="login_uid" name="uid" class="loginfield" style="width:144px;" /></td>
                </tr>
                <tr>
	                <td class="loginfield">密　码：<input id="login_pwd" name="pwd" type="password" class="loginfield" style="width:144px;" /></td>
                </tr>
                <tr>
	                <td class="loginfield">验证码：<input id="login_cod" name="cod" class="loginfield" style="width:80px;" /><img id="login_cim" style="margin:0px 0px 0px 10px;" src="imgcode.aspx" align="absmiddle" onclick="this.src='imgcode.aspx?'+Math.random();"/></td>
                </tr>
                <tr>
	                <td style="padding-top:4px;"><marquee id="login_error" behavior="alternate" scrollamount="8" scrolldelay="200" style="width:200px;text-align:left;color:#993c39;margin-left:15px;font-size:14px;" onmouseover="this.stop();" onmouseout="this.start();" ></marquee><input type="submit" class="button_login" value="" /></td>
                </tr>
                </form>
            </table>
            
        </td>
    </tr>
</table>

<!--子窗口边框-->
<table id="swin" border="0" cellpadding="0" style="border-collapse: collapse;display:none;top1:800px;">
	<tr>
		<td class="swin-top-left">　</td>
		<td class="swin-top"><div id="swin-title"></div></td>
		<td class="swin-top" valign="top"><input type="button" class="swin-close" onclick="swin_close();" onmouseover="this.style.backgroundPositionY=20; " onmouseout="this.style.backgroundPositionY=0;" /></td>
		<td class="swin-top-right">　</td>
	</tr>
	<tr>
		<td class="swin-left">　</td>
		<td id="swin-body" colspan="2" bgcolor="#ffffff"><iframe id="swinframe" src="blank.htm" name="swinframe" width="100%" height="100%" border="0" frameborder="0" scrolling="yes"></iframe></td>
		<td class="swin-right">　</td>
	</tr>
	<tr>
		<td class="swin-bottom-left">　</td>
		<td class="swin-bottom" colspan="2">　</td>
		<td class="swin-bottom-right">　</td>
	</tr>
</table>



<!--Msgbox-->

<div id="msgbox_back" style="display:none;">
<table id="msgbox" border="0">
	<tr>
		<td id="msgbox_top" height="25" colspan="2">
		<input id="msgbox_title" type="button"/><input id="msgbox_close" type="button" onclick="hidemsgbox();"/>
		</td>
	</tr>
	<tr bgcolor="#FFFFFF" ondblclick="hidemsgbox();">
		<td id="msgbox_icon" width="100"></td>
		<td width="256">
		    <div id="msgbox_text"></div>
		</td>
	</tr>
</table>
</div>



<!--Logo-->
<div id="logo" ondblclick="hidelogo();"><div id="logoimg"></div></div>

<!--系统提示-->
<div id="notice" ondblclick="hidelogo();"><a id="adesktop" class="a1" href="Desktop.aspx" onclick="if(this.innerHTML=='登录'){dialog_login_reset('Desktop.aspx');return false;}"></a>&nbsp;&nbsp;<%=DateTime.Today.ToLongDateString() %></div>

<!--主菜单-->
<table id="menubar" ondblclick="hidelogo();">
	<tr>
		<td id="hotmenu" nowrap onclick="return;hidelogo();hidesubmenu();">我的首页</td>
		<td class="mm" nowrap><a class="a1" href="ScHome.aspx">生产管理</a></td>
		<td class="mm" nowrap><a class="a1" href="FcHome.aspx">分厂管理</a></td>
		<td class="mm" nowrap><a class="a1" href="SaleHome.aspx">采购管理</a></td>
		<td class="mm" nowrap><a class="a1" href="XsHome.aspx">销售管理</a></td>
		<td class="mm" nowrap><a class="a1" href="StoreHome.aspx">物流中心</a></td>
		<td class="mm" nowrap><a class="a1" href="SbjdHome.aspx">设备机动</a></td>
		<td class="mm" nowrap><a class="a1" href="JszlHome.aspx">技术质量</a></td>
		<td class="mm" nowrap><a class="a1" href="JcfxHome.aspx">决策分析</a></td>
		<td class="mm" nowrap><a class="a1" href="CwhsHome.aspx">财务核算</a></td>
		<td class="mm" nowrap><a class="a1" href="SettingsHome.aspx">基础数据</a></td>
		<td class="mm" nowrap><a class="a1" href="AdminHome.aspx">系统维护</a></td>

		<td class="mm" nowrap></td>
		<td id="menuspace"></td>
		<td class="mmexit" nowrap>
		<a class="a1" target="_top" href="DoFunction.aspx?id=0">退出</a></td>
	</tr>
</table>

<!--主菜单与子菜单间隔-->
<div id="hsplit">
    <table width="172" height="3">
	    <tr>
		    <td id="submenutop" class="splittd1"></td>
		    <td class="splittd2"></td>
	    </tr>
    </table>
</div>

<!--二级菜单主显示区域-->
<table id="mainview">
	<tr>
		<td id="submenuview" align="center" valign= "top"></td>
		<td id="vsplit" onclick="hidesubmenu();"><div class="vsplitshow"></div></td>
		<td style="padding:8px 6px 6px 1px;">
		<iframe id="mainframe" name="contents" width="100%" border="0" frameborder="0" src="blank.htm" scrolling="yes"></iframe>
		<iframe name="hideframe" style="width:0px;height:0px;"></iframe>
		</td>
	</tr>
</table>
<script language="javascript">
    var logohided = false;
    var submenuhided = false;
    var logo = document.getElementById("logo");
    var notice = document.getElementById("notice");
    var menubar = document.getElementById("menubar");
    var menubarwidth = menubar.clientWidth;
    var menuspace = document.getElementById("menuspace");
    var mainview = document.getElementById("mainview");
    var submenuview = document.getElementById("submenuview");
    var mainframe = document.getElementById("mainframe");
    var submenutop = document.getElementById("submenutop");
    var vsplit = document.getElementById("vsplit");
    var msgbox_back = document.getElementById("msgbox_back");
    var msgbox = document.getElementById("msgbox");
    var submenunum = 0;
    var openedmenu = null;
    var hot = null;
    var swin = document.getElementById("swin");
    var swinbody = document.getElementById("swin-body");
    var swintitle = document.getElementById("swin-title");
    
    function hidemsgbox() {
        msgbox_back.style.display = "none";
        msgbox.style.display = "none";
    }
    hidemsgbox();
    window.onresize = doresize;
    doresize()
    mainframe.src = "<%=Home%>";

    var textboxs = document.getElementsByTagName("input");
    var i;
    for (i = 0; i < textboxs.length; i++) {
        if (textboxs[i].className == "loginfield") {

            textboxs[i].onfocus = function(e) { this.select(); };
        }
    }
</script>

</body>
</html>
